<?php


namespace App\Dao;

use App\Model\UserInfo;

class UserInfoDao extends AbstractDao
{
    public function where(array $where): \Hyperf\Database\Model\Builder
    {
        $query = UserInfo::query();
        foreach ($where as $k => $v) {
            if (is_array($v)) {
                $query->where($k, $v[0], $v[1]);
            } else {
                $query->where($k, $v);
            }
        }
        return $query;
    }
}